import Vue from 'vue'
import App from './App'
import store from './store'

import socket from './util/websocket.js'

Vue.prototype.$store = store
import {
	myRequest,
	myRequest2
} from './util/api.js'
import uView from 'uview-ui';

Vue.use(uView)
Vue.prototype.$myRequest = myRequest
Vue.prototype.$myRequest2 = myRequest2
Vue.config.productionTip = false

import webSocket from '@/util/websocket.js'

//websocket连接
const token = uni.getStorageSync('TOKEN');
if (token) {
	webSocket.connectWebSocket(token)
}else{
	console.log("token不存在")
}


const app = new Vue({
	...App,
	//挂载
	store,
	webSocket
})

app.$mount()
